import { request } from "@/utils/request";

// 基础配置
export function reqBasisConfig() {
  return request<BasisConfigMo>({
    url: "/roomManage/basis/config/show",
    method: "get"
  });
}

// 基础配置设置
export function reqBasisConfigEdit(data: Record<string, any>) {
  return request({
    url: "/roomManage/basis/config/edit",
    method: "post",
    data
  });
}

// 收款方式
export function reqPaymentMethods() {
  return request<PaymentMethodMo[]>({
    url: "/roomManage/basis/config/paymentMethods/show",
    method: "get"
  });
}

// 收款方式-提交
export function reqPaymentMethodsEdit(data: Record<string, any>) {
  return request({
    url: "/roomManage/basis/config/paymentMethods/edit",
    method: "post",
    data
  });
}

// 获取游戏设置信息
export function reqGameSettingShow() {
  return request<GameListMo[]>({
    url: "/roomManage/game/setting/show",
    method: "get"
  });
}

// 设置游戏
export function reqGameSettingSwitch(data: Record<string, any>) {
  return request<boolean>({
    url: "/roomManage/game/setting/switch",
    method: "post",
    data
  });
}

// 获取消息列表
export function reqMessageShow(LotteryId: number) {
  return request<MessageSettingJson>({
    url: "/roomManage/game/message/setting/show",
    method: "get",
    params: {
      LotteryId
    }
  });
}

// 消息修改
export function reqMessageEdit(data: Record<string, any>) {
  return request({
    url: "/roomManage/game/message/setting/edit",
    method: "post",
    data
  });
}

// 消息一键恢复默认
export function reqMessageDefault(LotteryId: number) {
  return request({
    url: "/roomManage/game/message/setting/defaults",
    method: "post",
    data: { LotteryId }
  });
}

// 获取游戏列表
export function reqReplyList(params: Record<string, any>) {
  return request({
    url: "/roomManage/quick/reply/list",
    method: "get",
    params
  });
}

// 添加
export function reqReplyAdd(data: Record<string, any>) {
  return request({
    url: "/roomManage/quick/reply/add",
    method: "post",
    data
  });
}

// 修改
export function reqReplyEdit(data: Record<string, any>) {
  return request({
    url: "/roomManage/quick/reply/edit",
    method: "post",
    data
  });
}

// 删除
export function reqReplyDel(Id: number) {
  return request({
    url: "/roomManage/quick/reply/del",
    method: "post",
    data: { Id }
  });
}

// 更新房间号
export function reqUpdateRoomCode(Password: string) {
  return request<{
    RoomCode: string;
  }>({
    url: "/roomManage/basis/update/roomCode",
    method: "post",
    data: { Password }
  });
}
